//
//  CMonsterObject.cpp
//  beast_tamer
//
//  Created by  bk on 13/2/24.
//
//

#include "CMonsterObject.h"
#include "CAIBehaviorEnteringLayer.h"
#include "CAIBehaviorStandardAttack.h"

CMonsterObject::CMonsterObject():CBattleObject()
{
    
}

CMonsterObject::~CMonsterObject()
{
    
}

bool CMonsterObject::Init(CCNode* pNode , fPoint point)
{
    if (!CBattleObject::Init(pNode , point))
        return false;
    
    if (m_pAiManager)
    {
        
        
        m_pAiManager->AddState(BATTLE_OBJECT_STATE_NPC_ENTERING_LAYER, CAIBehavior::Create<CAIBehaviorEnteringLayer>(m_pAiManager));
        
        m_pAiManager->SetInitialState(BATTLE_OBJECT_STATE_NPC_ENTERING_LAYER);
        
        m_pAiManager->Init(this);
        
        m_pAiManager->AddState(BATTLE_OBJECT_STATE_NPC_STANDARD_ATTACK, CAIBehavior::Create<CAIBehaviorStandardAttack>(m_pAiManager));
    }
    
    
    
    return true;
}

void CMonsterObject::Update(CCNode* pNode, float dTime)
{
    CBattleObject::Update(pNode, dTime);
}


void CMonsterObject::Release(CCNode* pNode)
{
    CBattleObject::Release(pNode);
}
